<html>
<head>

	<link rel="stylesheet" href="coreV2.css" type="text/css" />	
	<link rel="stylesheet" href="debug.css" type="text/css" />


	<script src="http://random.corp.meebo.com/~abel/js/jquery.js"></script>
	<script src="http://random.corp.meebo.com/~abel/js/jquery-ui.min.js"></script>
	<script src="http://random.corp.meebo.com/~abel/js/jquery.template.js"></script>
	<script src="http://random.corp.meebo.com/~abel/js/json2.js"></script>

<!--
	<script src="http://localhost/~aallison/js/jquery.js"></script>
	<script src="http://localhost/~aallison/js/jquery-ui.min.js"></script>
	<script src="http://localhost/~aallison/js/jquery.template.js"></script>
	<script src="http://localhost/~aallison/js/json2.js"></script>
-->

	<script src="ControlPanelV2.js"></script>
	<script src="CanvasV3.js"></script>
	<script src="CanvasObjectV3.js"></script>
	<script src="layoutV2.js"></script>
	<script src="debug.js"></script>
	<script src="saveload.js"></script>

	<script>
	
		function evalConsoleLine( line ) {
			var tokens = line.split(" ");
			var cmd = tokens[0];
			
			if (cmd == "clear" || cmd == "c") {
				$("console_output").empty();
			} else if (cmd == "e" || cmd == "eval") {
  				cprint("Eval: " + tokens[1]);
  				eval(tokens[1] + ";");
  			} else if (cmd == "d" || cmd == "debug") {
  				if (tokens[1] == "canvas") {
  					Canvas.debug = !Canvas.debug;
  				} else if (tokens[1] == "canvasobject") {
  					CanvasObject.debug = !CanvasObject.debug;
  				}
  			}
  			
		}
	
		$(function() {
		
			if (window.location.hash == "#console") {
				initDebug("#debug");
			} else {
				initApp();
			}

		});
		
		function initApp() {
			initControlPanel();
			initCanvas();
			theControlPanel().fullRefresh();
			theControlPanel().updateNavMap();
			
			$(document).keydown(function(e) {
				if (e.keyCode == 46) {
				
				}
			});
		}
	
	</script>
	
</head>

<body>

	<div id="container">
		
		<div id="debug"></div>
	
		<div id="control_panel_container" class="control_panel_container"></div>
		<div id="canvas_container" class="canvas_container"></div>

	</div>

</body>
</html>